import request from '@/utils/request'
export function ticketIdentify (aiType, formData) {
  let url;
  switch (aiType) {
    case '1':
      url = '/api/Common/BaiduAI/VatInvoice'
      break
    case '2':
      url = '/api/Common/BaiduAI/QuotaInvoice'
      break
    case '3':
      url = '/api/Common/BaiduAI/TrainTicket'
      break
    case '4':
      url = '/api/Common/BaiduAI/TaxiReceipt'
      break
    case '5':
      url = '/api/Common/BaiduAI/AirTicket'
      break
    case '6':
      url = '/api/Common/BaiduAI/Invoice'
      break
    case '7':
      url = '/api/Common/BaiduAI/TollInvoice'
    case '8':
      url = '/api/Common/BaiduAI/ShoppingReceipt'
      break
    default:
      this.$message('请选择识别发票的类型。')
      return
  }
  return request({
    url: url,
    method: 'post',
    data: formData,
    headers: { 'Content-Type': 'multipart/form-data' },
  })
}